package servlets;

import java.io.IOException;

import javax.ejb.EJB;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import be.ipl.finito.domaine.Joueur;
import be.ipl.finito.usecases.GestionJoueur;

@SuppressWarnings("serial")
@WebServlet(name = "servlet_logout.html")
public class Logout extends HttpServlet {
	protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		request.getSession().invalidate();
		String url = response.encodeRedirectURL("index.html");
		response.sendRedirect(url);
	}
}
